package com.qingcloud.adminbackend.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.qingcloud.adminbackend.entity.eid.EidBatchPageDTO;
import com.qingcloud.adminbackend.entity.eid.EidBatchPageParam;
import com.qingcloud.adminbackend.entity.eid.SysEquipmentidGen;
import com.qingcloud.adminbackend.entity.stationgroup.SysStationGroup;
import org.apache.ibatis.annotations.Param;

/**
 * <p>
 * 设备编号生成 Mapper 接口
 * </p>
 *
 * @author wangjinnan
 * @since 2019-04-17
 */
public interface SysEquipmentidGenMapper extends BaseMapper<SysEquipmentidGen> {

    /**
     * 根据产品类型查询最大设备编号
     *
     * @param product  产品
     * @param domainId 城市编号
     * @return
     */
    String findMaxByProduct(@Param("product") int product, @Param("domainId") Integer domainId);

    /**
     * 分页查询编号批次
     *
     * @param page
     * @param pageParam
     */
    IPage<EidBatchPageDTO> searchPage(Page<SysStationGroup> page, @Param("param") EidBatchPageParam pageParam);
}
